package cn.tedu.tmall.admin.mall.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class CategoryParam implements Serializable {
    @ApiModelProperty(
            required = true,
            example = "经验",
            dataType = "String")
    @NotNull(message = "类别名称不能为空-byNull")
    @NotBlank(message = "类别名称不能为空-byBlank")
    @NotEmpty(message = "类别名称不能为空-byEmpty")
    @Size(min = 1,max = 5,message = "类别名称不能太长-BySize")
    @Length(min = 1,max = 5,message = "类别名称不能太长-ByLength")
    String name;
}
